package com.service;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.session.SqlSession;

import com.dao.FileDao;
import com.pojo.Filepojo;
import com.util.MybatisSessionFactory;

public class FileService {
	SqlSession session = MybatisSessionFactory.getSqlSession();
	FileDao c = session.getMapper(FileDao.class);
//查询全部
	public List<Filepojo> queryfile(String id) {
		List<Filepojo> ren = c.queryfile(id);
		return ren;
	}
//添加
	public void addfile(@Param("archive_id") String archive_id,
			@Param("name") String name) {
		c.addfile(archive_id, name);
		session.commit();
	}
//删除照片
	public void deletephoto(@Param("id") String id) {
		c.deletephoto(id);
		session.commit();
	}
}
